package com.healthy.medical.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.medical.mapper.MedicalInstitutionsMapper;
import com.healthy.medical.domain.MedicalInstitutions;
import com.healthy.medical.service.IMedicalInstitutionsService;

/**
 * 医疗机构Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class MedicalInstitutionsServiceImpl implements IMedicalInstitutionsService 
{
    @Autowired
    private MedicalInstitutionsMapper medicalInstitutionsMapper;

    /**
     * 查询医疗机构
     * 
     * @param id 医疗机构主键
     * @return 医疗机构
     */
    @Override
    public MedicalInstitutions selectMedicalInstitutionsById(Long id)
    {
        return medicalInstitutionsMapper.selectMedicalInstitutionsById(id);
    }

    /**
     * 查询医疗机构列表
     * 
     * @param medicalInstitutions 医疗机构
     * @return 医疗机构
     */
    @Override
    public List<MedicalInstitutions> selectMedicalInstitutionsList(MedicalInstitutions medicalInstitutions)
    {
        return medicalInstitutionsMapper.selectMedicalInstitutionsList(medicalInstitutions);
    }

    /**
     * 新增医疗机构
     * 
     * @param medicalInstitutions 医疗机构
     * @return 结果
     */
    @Override
    public int insertMedicalInstitutions(MedicalInstitutions medicalInstitutions)
    {
        return medicalInstitutionsMapper.insertMedicalInstitutions(medicalInstitutions);
    }

    /**
     * 修改医疗机构
     * 
     * @param medicalInstitutions 医疗机构
     * @return 结果
     */
    @Override
    public int updateMedicalInstitutions(MedicalInstitutions medicalInstitutions)
    {
        return medicalInstitutionsMapper.updateMedicalInstitutions(medicalInstitutions);
    }

    /**
     * 批量删除医疗机构
     * 
     * @param ids 需要删除的医疗机构主键
     * @return 结果
     */
    @Override
    public int deleteMedicalInstitutionsByIds(Long[] ids)
    {
        return medicalInstitutionsMapper.deleteMedicalInstitutionsByIds(ids);
    }

    /**
     * 删除医疗机构信息
     * 
     * @param id 医疗机构主键
     * @return 结果
     */
    @Override
    public int deleteMedicalInstitutionsById(Long id)
    {
        return medicalInstitutionsMapper.deleteMedicalInstitutionsById(id);
    }
}
